package com.learn.metrics.type.healthCheck.check;

import com.codahale.metrics.health.HealthCheck;
import com.codahale.metrics.health.annotation.Async;
import lombok.RequiredArgsConstructor;

/**
 * @author XuYang
 * @since 2025/2/19 10:18
 */
@RequiredArgsConstructor(staticName = "of")
@Async(period = 2)
public class AsyncRandomHealthCheck
    extends HealthCheck
{
    private final HealthCheck check;

    @Override
    protected Result check() throws Exception {
        return check.execute();
    }
}
